package com.compty.paint.manager;

import java.util.List;

import com.compty.core.hibernate.HibernateEntityDao;
import com.compty.security.domain.User;

public class UserInfoManager extends HibernateEntityDao<User>{

	@SuppressWarnings("unchecked")
	public User findByName(String uName) {
		String hql = "from User where username = ? order by id desc";
		List<User> userlist = super.find(hql, uName);
		if ( userlist != null && userlist.size() > 0) {
			return userlist.get(0);
		}
		return null;
	}
	

}
